#!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
# //r 读取  a 创建  w写入
fo=open('3.txt',"r")
#fo.write('www.baidu.com')

w=open('3.txt',"a+")
w.write("python")

n =fo.read()
print(n)

ftell= fo.tell()
print(ftell)

fotell =fo.seek(0,0)
print(ftell)


os.rename('3.txt','31.txt')

fo.close()

# 删除一个已经存在的文件test2.txt
#os.remove("test2.txt")